package com.tcs.test.rili;

import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 打印模板
 * 
 * @author wangbo
 *
 */
public class PrintRiLi {

	private final Logger logger = LoggerFactory.getLogger(PrintRiLi.class);

	private final Integer MAXMONTH = 12;

	private DateTime dateTime = DateTime.now();

	private Integer month;

	private Integer indexOf;

	@Before
	public void beginGo() {
		month = dateTime.getMonthOfYear();
	}

	@Test
	public void print() {
		try {
			for (; month <= MAXMONTH; month++) {
				for (int j = 1; j <= dateTime.plusMonths(indexOf).dayOfMonth().withMaximumValue()
						.getDayOfMonth(); j++) {
					System.out.println(dateTime.withMonthOfYear(month).withDayOfMonth(j).toString("YYYY-MM-dd E"));
					System.out.println("=====================================================================================================================\n 日志 : \n 笔记 : \n 图片 : \n");
					System.out.println("=====================================================================================================================\n");
				}
			}
		} catch (Exception e) {
			logger.error("", e);
		} finally {
			indexOf++;
		}
	}
}